#! /usr/bin/python

def combination(n, k):
    up = (n - k + 1)
    bottom = 1
    for i in range(2, k+1):
	up *= (n - k + i)
	bottom *= i
    return up/bottom

twins = []
total = 0
for i in range(1, 13):
    for j in range(i+3, 13):
	twins.append((i, j))
	total += combination(j-i-1, 2)
print total

triples = []
for i in range(1, 13):
    for j in range(i+1, 13):
	for k in range(j+1, 13):
	    triples.append((i, j, k))
	    ss = combination(j-i-1 + k-j-1, 3) + (i-1)*combination(k-j-1, 2)
	    total += ss
	    #print i, j, k, ss
print total

for i in range(1, 13):
    for j in range(i+1, 13):
	for k in range(j+1, 13):
	    for l in range(k+1, 13):
	        ss = combination(l-i-3, 4) + (i-1)*(j-i-1)*combination(l-k-1, 2) + (i-1)*combination(l-j-2, 3) + combination(i-1, 2)*combination(l-k-1, 2)
		total += ss

print total

five = []
for i in range(1, 13):
    for j in range(i+1, 13):
	for k in range(j+1, 13):
	    for l in range(k+1, 13):
		for m in range(l+1, 13):
		    five.append((i, j, k, l, m))
total2 = 0
for i in range(len(five)):
    for j in range(i+1, len(five)):
	l1 = [a for a in five[i]]
	l2 = [a for a in five[j]]
	sl1 = set(l1)
	sl2 = set(l2)
	if len(sl1.intersection(sl2)) != 0: continue
	if l1[0] < l2[0]:
	   for k in range(1, len(l1)):
	       if l1[k] > l2[k]: 
		  #print l1, l2
		  total += 1
		  break
print total

six = []
for i in range(1, 13):
    for j in range(i+1, 13):
	for k in range(j+1, 13):
	    for l in range(k+1, 13):
		for m in range(l+1, 13):
		    for n in range(m+1, 13):
		        six.append((i, j, k, l, m, n))

for i in range(len(six)):
    for j in range(i+1, len(six)):
	l1 = [a for a in six[i]]
	l2 = [a for a in six[j]]
	sl1 = set(l1)
	sl2 = set(l2)
	if len(sl1.intersection(sl2)) != 0: continue
	if l1[0] < l2[0]:
	   for k in range(1, len(l1)):
	       if l1[k] > l2[k]: 
		  #print l1, l2
		  total += 1
		  break
print total

